<template>
  <div>
    <div class="popupBox" v-if="popopData.is_show">
      <template>
        <div class="popup" v-if="popopData.show_type == 'window'">
          <img
            :src="popopData.params.list[0].picUrl"
            alt=""
            v-if="popopData.params.list.length > 0"
          />
        </div>
      </template>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    widgetList: {
      type: Array,
      default: () => {
        return [];
      },
    },
  },
  computed: {
    popopData() {
      let [item] = this.widgetList.filter((d) => {
        return d.show_type == "window";
      });
      return item || {};
    },
  },
  data() {
    return {};
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
.popupBox {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: 1000;
  left: 0;
  top: 0;
  background-color: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.popup {
  img {
    max-width: 276px;
  }
}
</style>